/**
 * Sensor Network Development Kit for 1-Wire Network (SeN)
 * Version : 0.1
 * Revision date : 2008-10-13
 * Author: Dubravko Penezic, dpenezic@gmail.com
 * 
 * Based on T. Bitson, SimpleWeather, OWDevice.java, 2007
 */

package owLib;

/**
 * OWDevice class define data which is necessary to reach 1-Wire device on 1-Wire network
 * Version : 0.1.1
 * Revision date : 2008-10-13
 * 
 * @author Dubravko Penezic, dpenezic@gmail.com
 *
 */
public class OWDevice
{

  private String dAddress;    //hex address of 1-Wire device in string notation
  private String[] hAddress;  //array of hex address in string notation of hub which are on path to reach 1-Wire device (from root till last)
  private String[] hPorts;    //array of ports string value ("main", "aux") of corresponding hubs
  
/**
 * OWDevice is initial method, for setting attributes value  
 * @param dAddress
 * @param hAddress
 * @param hPorts
 */
  public OWDevice(String dAddress, String[] hAddress, String[] hPorts)
  {
    this.dAddress = dAddress;
    this.hAddress = hAddress;
    this.hPorts = hPorts;
  }
  
/**
 * getDAddress is method which return 1-Wire device hex address like a string
 *  
 * @return device hex address like a string
 */
  public String getDAddress()
  {
    return this.dAddress;
  }
  
  /**
   * getHAddress is method which return array of hex address in string notation of hub which are on path to reach 1-Wire device (from root till last)
   *  
   * @return array of hex address in string notation of hub
   */  
  public String[] getHAddress()
  {
    return this.hAddress;
  }
  
  /**
   * getHPorts is method which return array of ports string value ("main", "aux") of corresponding hubs
   *  
   * @return array of ports string value ("main", "aux") of corresponding hubs
   */  
  public String[] getHPorts()
  {
    return this.hPorts;
  }
  
}

